import Vuex from "vuex"
import Vue from "vue";

Vue.use(Vuex)

import home from "@/store/home"
import search from "@/store/search"
import detail from "@/store/detail"
import shopCart from '@/store/shopCart'
import user from '@/store/user'
import trade from '@/store/trade'
import pay from '@/store/pay'
import center from '@/store/center'

// state: {},//存储数据的
// mutations: {},//修改state
// actions: {},//常用于发起axios请求。只能写业务逻辑，不能修改state
// getters: {},//类似于getter

//对完暴露store实例
export default new Vuex.Store({
    modules: {
        home,
        search,
        detail,
        shopCart,
        user,
        trade,
        pay,
        center
    }
})